﻿Public Partial Class Formulario_web13
    Inherits System.Web.UI.Page

    Private Sub GridView1_RowCommand1(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
        ' If multiple buttons are used in a GridView control, use the
        ' CommandName property to determine which button was clicked.
        If e.CommandName = "editar" Then
            ' Convert the row index stored in the CommandArgument
            ' property to an Integer.
            Dim index As Integer = Convert.ToInt32(e.CommandArgument)
            Me.TBnombre.Text = Me.GridView1.Rows(index).Cells(1).Text
            Me.TBapellido.Text = Me.GridView1.Rows(index).Cells(2).Text
        Else
            'If e.CommandName = "eliminar" Then

            'End If
        End If
    End Sub

    'Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
    '    If e.Row.RowType = DataControlRowType.DataRow Then
    '        e.Row.Attributes.Add("onmouseover", "this.originalcolor=this.style.backgroundColor;" & _
    '                             " this.style.backgroundColor='orange';")
    '        e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=this.originalcolor;")
    '    End If
    'End Sub
    Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles GridView1.SelectedIndexChanged

    End Sub
End Class